<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8" />
        <title>18_案例练习-求1-100中是3的倍数的数字和</title>
    </head>
    <body>
        <script>

            var sum = 0;

            for(var i = 1; i <= 100; i++){
                if(i % 3 == 0) {
                    sum += i;
                }
            }

            console.log(sum);
        
        </script>
    </body>
</html>